package com.zlc.common.core.position.service.impl;


import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.zlc.common.common.service.BaseServiceImpl;
import com.zlc.common.core.position.mapper.MayanPlatDeptPositionMapper;
import com.zlc.common.core.position.model.entity.MayanPlatDeptPosition;
import com.zlc.common.core.position.model.vo.MayanPlatDeptPositionVo;
import com.zlc.common.core.position.service.MayanPlatDeptPositionService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * @author  zl
 * @date 2023-05-25 
 */
@Service
@Transactional(rollbackFor = Exception.class)
public class MayanPlatDeptPositionServiceImpl extends BaseServiceImpl<MayanPlatDeptPositionMapper, MayanPlatDeptPosition, MayanPlatDeptPositionVo> implements MayanPlatDeptPositionService {

    @Override
    public MayanPlatDeptPositionVo getByPositionCodeAndDeptCode(String positionCode, String deptCode) {
        LambdaQueryWrapper<MayanPlatDeptPosition> wrapper = wrapper().eq(MayanPlatDeptPosition::getPositionCode, positionCode)
                .eq(MayanPlatDeptPosition::getDeptCode, deptCode);
        return queryOne(wrapper);
    }
}
